package me.ereach.oopinterface;

public class Employee {
    private String name;
    private float totalIncome;
    private ITax iTax;

    public Employee(String name, float totalIncome) {
        this.name = name;
        this.totalIncome = totalIncome;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public float getTotalIncome() {
        return totalIncome;
    }

    public void setTotalIncome(float totalIncome) {
        this.totalIncome = totalIncome;
    }

    public ITax getiTax() {
        return iTax;
    }

    public void setiTax(ITax iTax) {
        this.iTax = iTax;
    }

    public float getActualSalary() {
        return totalIncome - iTax.getTax(totalIncome);
    }
}



